//#include "s_sendexchange.h"
//#include "ui_s_sendexchange.h"

//#include <QSqlQuery>
//#include <QDateTime>
//#include <QMessageBox>

//extern QString global3;
//S_sendExchange::S_sendExchange(QWidget *parent) :
//    QDialog(parent),
//    ui(new Ui::S_sendExchange)
//{
//    ui->setupUi(this);

//}

//S_sendExchange::~S_sendExchange()
//{
//    delete ui;
//}

//void S_sendExchange::on_submitBtn_clicked()
//{
//    QString str=QString("select * from student where sid='%1'").arg(global3);
//    QSqlQuery query;
//    query.exec(str);
//    QString nrid,nbui_bid,rid,bui_bid,because,eresult,eflag,edate,sname;
//    QDate date(QDate::currentDate());
//    int year=date.year();
//    int month=date.month();
//    int day=date.day();
//    edate=QString("%1.%2.%3").arg(year).arg(month).arg(day);
//    qDebug()<<edate;
//    if(query.next()){
//        nrid=query.value(6).toString();
//        nbui_bid=query.value(7).toString();
//        rid=ui->needRoomExit->text();
//        bui_bid=ui->needBuildExit->text();
//        because=ui->whyEdit->toPlainText();
//        eresult="null";
//        eflag="0";
//        sname=query.value(1).toString();
//        str=QString("insert into exchangroom "
//                    "value('%1',null,'%2','%3','%4','%5','%6',null,'0','%7','%8')")
//                    .arg(global3).arg(nrid).arg(nbui_bid).arg(rid).arg(bui_bid).arg(because)
//                    .arg(edate).arg(sname);
//        qDebug()<<str;
//        if(query.exec(str)==true){
//            QMessageBox::information(NULL,"tips","申请成功");
//            this->close();
//        }
//        else QMessageBox::warning(NULL,"Error","申请失败,同时只允许进行一个调换申请");
//    }
//}

